using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using BasicForms;

namespace BasicForms
{
    public partial class FrmNamTaiChinh : FrmOKCancel
    {
        int _NamTaiChinh = -1;

        public FrmNamTaiChinh()
        {
            InitializeComponent();
        }

        public FrmNamTaiChinh(int namTaiChinh)
        {
            InitializeComponent();
            _NamTaiChinh = namTaiChinh;
        }

        protected override void btnOK_Click(object sender, EventArgs e)
        {
            
            GeneralLibs.Config.NamTaiChinh = (int)numNamTaiChinh.Value;
            Close();
        }

        private void FrmNamTaiChinh_Load(object sender, EventArgs e)
        {
            if (DesignMode) return;
            if (_NamTaiChinh != -1)
            {
                numNamTaiChinh.Value = _NamTaiChinh;
            }
            else
            {
                numNamTaiChinh.Value = (decimal)GeneralLibs.Config.NamTaiChinh;
            }
        }

        private void btnOK_Click_1(object sender, EventArgs e)
        {

        }
    }
}